<template>
    <a-card :bordered="false">
        <a-spin :spinning="confirmLoading">
            <div class="table-operator">
                <a-button shape="round" size="small" type="primary" @click="handleEdit(model,'companiesForm','编辑')">编辑</a-button>
            </div>

            <div style="margin:20px;background-color: #ffffff;" v-html="descContent"></div>
            <companiesForm ref="companiesForm" @close="query" @ok="query"></companiesForm>
        </a-spin>
    </a-card>
</template>

<script>
import request from '@/utils/request'
import {SysMixin} from '@/mixins/SysMixin'
import defaultSettings from '@/config/defaultSettings'
import companiesForm from './companiesForm'

export default {
    name:'companiesDesc',
    components:{ companiesForm},
    mixins:[SysMixin],
    data(){
        return{
            defaultSettings,
            width:document.documentElement.clientWidth,
            formAttributes:{
              type:'',//collapse,tabs
              formItems:[
                {
                  title:'标签一',
                  columns:1,
                  fields:[
                    {field:'descContent',label:'',component:'tinymce',model:{},content:'', height:'80vh', width:'100%',rules: [{required: true, message: '不能为空'}]},
                     
                  ]
                },
              ]

            },
            model:{},
            confirmLoading:false,
            descContent:null
            
        }
    },
    created(){
       this.query()
    },
    mounted(){
       
    },
    methods:{
        query(){
            request.get('/KhyCompaniesDescController/queryCompaniesDesc',{}).then(res=>{
                if(res.success){
                    this.model=res.result
                    this.descContent = require('js-base64').Base64.decode(this.model.descContent)
                }else{
                    this.$message.warning(res.message);
                }
            })
        }

    }
}
</script>